package Mangos::DB::Mangos::CreatureAiScripts;

use strict;

use base qw(Mangos::DB::Mangos);

__PACKAGE__->meta->setup
(
    table   => 'creature_ai_scripts',

    columns => 
    [
        id                       => { type => 'integer', not_null => 1 },
        creature_id              => { type => 'integer', default => '0', not_null => 1 },
        event_type               => { type => 'integer', default => '0', not_null => 1 },
        event_inverse_phase_mask => { type => 'integer', default => '0', not_null => 1 },
        event_chance             => { type => 'integer', default => 100, not_null => 1 },
        event_flags              => { type => 'integer', default => '0', not_null => 1 },
        event_param1             => { type => 'integer', default => '0', not_null => 1 },
        event_param2             => { type => 'integer', default => '0', not_null => 1 },
        event_param3             => { type => 'integer', default => '0', not_null => 1 },
        event_param4             => { type => 'integer', default => '0', not_null => 1 },
        action1_type             => { type => 'integer', default => '0', not_null => 1 },
        action1_param1           => { type => 'integer', default => '0', not_null => 1 },
        action1_param2           => { type => 'integer', default => '0', not_null => 1 },
        action1_param3           => { type => 'integer', default => '0', not_null => 1 },
        action2_type             => { type => 'integer', default => '0', not_null => 1 },
        action2_param1           => { type => 'integer', default => '0', not_null => 1 },
        action2_param2           => { type => 'integer', default => '0', not_null => 1 },
        action2_param3           => { type => 'integer', default => '0', not_null => 1 },
        action3_type             => { type => 'integer', default => '0', not_null => 1 },
        action3_param1           => { type => 'integer', default => '0', not_null => 1 },
        action3_param2           => { type => 'integer', default => '0', not_null => 1 },
        action3_param3           => { type => 'integer', default => '0', not_null => 1 },
        comment                  => { type => 'varchar', default => '', length => 255, not_null => 1 },
    ],

    primary_key_columns => [ 'id' ],
);

1;

package Mangos::DB::Mangos::CreatureAiScripts::Manager;

use strict;
use warnings;

use base 'Rose::DB::Object::Manager';

sub object_class { 'Mangos::DB::Mangos::CreatureAiScripts' }

__PACKAGE__->make_manager_methods('creature_ai_scripts');

1;
